package com.action.user.service.impl;

import com.action.user.dao.UserDao;
import com.action.user.model.User;
import com.action.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public int insert(User record) {
       int i =  userDao.insert(record);
        return i;
    }

    @Override
    public void deleteUserById(Integer userId) {
        userDao.deleteUserById(userId);
    }

    @Override
    public void updateUser(User user) {
        userDao.updateUser(user);
    }

    @Override
    public List<User> selectUsers() {
        List<User> user = userDao.selectUsers();
        return user;
    }
}
